import React, { Component } from "react";
import {withRouter} from "./withRouter"

class Son2 extends Component {
  // son2里的属性：
  //   1、自己特有的属性
  //   2、公共的属性。

  goAdmin = () => {
    this.props.history.push("/Admin");
  };

  render() {
    return (
      <div>
        <h1>子组件二</h1>
        <p>age:{this.props.age}</p>
        <input type="button" value="测试" onClick={this.goAdmin} />
      </div>
    );
  }
}


export default withRouter(Son2);